3.1.64 \(\int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx\) [64]

3.1.64.1 Optimal result
3.1.64.2 Mathematica [B] (verified)
3.1.64.3 Rubi [A] (verified)
3.1.64.4 Maple [C] (verified)
3.1.64.5 Fricas [A] (verification not implemented)
3.1.64.6 Sympy [F]
3.1.64.7 Maxima [B] (verification not implemented)
3.1.64.8 Giac [A] (verification not implemented)
3.1.64.9 Mupad [B] (verification not implemented)

3.1.64.1 Optimal result

Integrand size = 21, antiderivative size = 105 \[ \int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {x}{a}-\frac {5 \text {arctanh}(\sin (c+d x))}{16 a d}-\frac {(16-5 \sec (c+d x)) \tan (c+d x)}{16 a d}+\frac {(8-5 \sec (c+d x)) \tan ^3(c+d x)}{24 a d}-\frac {(6-5 \sec (c+d x)) \tan ^5(c+d x)}{30 a d} \]

output
x/a-5/16*arctanh(sin(d*x+c))/a/d-1/16*(16-5*sec(d*x+c))*tan(d*x+c)/a/d+1/2 
4*(8-5*sec(d*x+c))*tan(d*x+c)^3/a/d-1/30*(6-5*sec(d*x+c))*tan(d*x+c)^5/a/d
 
3.1.64.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(301\) vs. \(2(105)=210\).

Time = 2.33 (sec) , antiderivative size = 301, normalized size of antiderivative = 2.87 \[ \int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \left (2400 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\sec (c) \sec ^6(c+d x) (2400 d x \cos (c)+1800 d x \cos (c+2 d x)+1800 d x \cos (3 c+2 d x)+720 d x \cos (3 c+4 d x)+720 d x \cos (5 c+4 d x)+120 d x \cos (5 c+6 d x)+120 d x \cos (7 c+6 d x)+3680 \sin (c)+450 \sin (d x)+450 \sin (2 c+d x)-3360 \sin (c+2 d x)+2160 \sin (3 c+2 d x)-25 \sin (2 c+3 d x)-25 \sin (4 c+3 d x)-1488 \sin (3 c+4 d x)+720 \sin (5 c+4 d x)+165 \sin (4 c+5 d x)+165 \sin (6 c+5 d x)-368 \sin (5 c+6 d x))\right )}{3840 a d (1+\sec (c+d x))} \]

input
Integrate[Tan[c + d*x]^8/(a + a*Sec[c + d*x]),x]
 
output
(Cos[(c + d*x)/2]^2*Sec[c + d*x]*(2400*(Log[Cos[(c + d*x)/2] - Sin[(c + d* 
x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + Sec[c]*Sec[c + d*x]^6 
*(2400*d*x*Cos[c] + 1800*d*x*Cos[c + 2*d*x] + 1800*d*x*Cos[3*c + 2*d*x] + 
720*d*x*Cos[3*c + 4*d*x] + 720*d*x*Cos[5*c + 4*d*x] + 120*d*x*Cos[5*c + 6* 
d*x] + 120*d*x*Cos[7*c + 6*d*x] + 3680*Sin[c] + 450*Sin[d*x] + 450*Sin[2*c 
 + d*x] - 3360*Sin[c + 2*d*x] + 2160*Sin[3*c + 2*d*x] - 25*Sin[2*c + 3*d*x 
] - 25*Sin[4*c + 3*d*x] - 1488*Sin[3*c + 4*d*x] + 720*Sin[5*c + 4*d*x] + 1 
65*Sin[4*c + 5*d*x] + 165*Sin[6*c + 5*d*x] - 368*Sin[5*c + 6*d*x])))/(3840 
*a*d*(1 + Sec[c + d*x]))
 
3.1.64.3 Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.14, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 4376, 25, 3042, 4369, 3042, 4369, 27, 3042, 4369, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^8(c+d x)}{a \sec (c+d x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cot \left (c+d x+\frac {\pi }{2}\right )^8}{a \csc \left (c+d x+\frac {\pi }{2}\right )+a}dx\)

\(\Big \downarrow \) 4376

\(\displaystyle \frac {\int -\left ((a-a \sec (c+d x)) \tan ^6(c+d x)\right )dx}{a^2}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\int (a-a \sec (c+d x)) \tan ^6(c+d x)dx}{a^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\int \cot \left (c+d x+\frac {\pi }{2}\right )^6 \left (a-a \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}\)

\(\Big \downarrow \) 4369

\(\displaystyle -\frac {\frac {\tan ^5(c+d x) (6 a-5 a \sec (c+d x))}{30 d}-\frac {1}{6} \int (6 a-5 a \sec (c+d x)) \tan ^4(c+d x)dx}{a^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {\tan ^5(c+d x) (6 a-5 a \sec (c+d x))}{30 d}-\frac {1}{6} \int \cot \left (c+d x+\frac {\pi }{2}\right )^4 \left (6 a-5 a \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}\)

\(\Big \downarrow \) 4369

\(\displaystyle -\frac {\frac {1}{6} \left (\frac {1}{4} \int 3 (8 a-5 a \sec (c+d x)) \tan ^2(c+d x)dx-\frac {\tan ^3(c+d x) (8 a-5 a \sec (c+d x))}{4 d}\right )+\frac {\tan ^5(c+d x) (6 a-5 a \sec (c+d x))}{30 d}}{a^2}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {\frac {1}{6} \left (\frac {3}{4} \int (8 a-5 a \sec (c+d x)) \tan ^2(c+d x)dx-\frac {\tan ^3(c+d x) (8 a-5 a \sec (c+d x))}{4 d}\right )+\frac {\tan ^5(c+d x) (6 a-5 a \sec (c+d x))}{30 d}}{a^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {1}{6} \left (\frac {3}{4} \int \cot \left (c+d x+\frac {\pi }{2}\right )^2 \left (8 a-5 a \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {\tan ^3(c+d x) (8 a-5 a \sec (c+d x))}{4 d}\right )+\frac {\tan ^5(c+d x) (6 a-5 a \sec (c+d x))}{30 d}}{a^2}\)

\(\Big \downarrow \) 4369

\(\displaystyle -\frac {\frac {1}{6} \left (\frac {3}{4} \left (\frac {\tan (c+d x) (16 a-5 a \sec (c+d x))}{2 d}-\frac {1}{2} \int (16 a-5 a \sec (c+d x))dx\right )-\frac {\tan ^3(c+d x) (8 a-5 a \sec (c+d x))}{4 d}\right )+\frac {\tan ^5(c+d x) (6 a-5 a \sec (c+d x))}{30 d}}{a^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\frac {1}{6} \left (\frac {3}{4} \left (\frac {1}{2} \left (\frac {5 a \text {arctanh}(\sin (c+d x))}{d}-16 a x\right )+\frac {\tan (c+d x) (16 a-5 a \sec (c+d x))}{2 d}\right )-\frac {\tan ^3(c+d x) (8 a-5 a \sec (c+d x))}{4 d}\right )+\frac {\tan ^5(c+d x) (6 a-5 a \sec (c+d x))}{30 d}}{a^2}\)

input
Int[Tan[c + d*x]^8/(a + a*Sec[c + d*x]),x]
 
output
-((((6*a - 5*a*Sec[c + d*x])*Tan[c + d*x]^5)/(30*d) + (-1/4*((8*a - 5*a*Se 
c[c + d*x])*Tan[c + d*x]^3)/d + (3*((-16*a*x + (5*a*ArcTanh[Sin[c + d*x]]) 
/d)/2 + ((16*a - 5*a*Sec[c + d*x])*Tan[c + d*x])/(2*d)))/4)/6)/a^2)
 

3.1.64.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4369
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( 
a_)), x_Symbol] :> Simp[(-e)*(e*Cot[c + d*x])^(m - 1)*((a*m + b*(m - 1)*Csc 
[c + d*x])/(d*m*(m - 1))), x] - Simp[e^2/m   Int[(e*Cot[c + d*x])^(m - 2)*( 
a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m 
, 1]
 

rule 4376
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( 
a_))^(n_), x_Symbol] :> Simp[a^(2*n)/e^(2*n)   Int[(e*Cot[c + d*x])^(m + 2* 
n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[a 
^2 - b^2, 0] && ILtQ[n, 0]
 
3.1.64.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 1.19 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.85

method result size
risch \(\frac {x}{a}-\frac {i \left (165 \,{\mathrm e}^{11 i \left (d x +c \right )}+720 \,{\mathrm e}^{10 i \left (d x +c \right )}-25 \,{\mathrm e}^{9 i \left (d x +c \right )}+2160 \,{\mathrm e}^{8 i \left (d x +c \right )}+450 \,{\mathrm e}^{7 i \left (d x +c \right )}+3680 \,{\mathrm e}^{6 i \left (d x +c \right )}-450 \,{\mathrm e}^{5 i \left (d x +c \right )}+3360 \,{\mathrm e}^{4 i \left (d x +c \right )}+25 \,{\mathrm e}^{3 i \left (d x +c \right )}+1488 \,{\mathrm e}^{2 i \left (d x +c \right )}-165 \,{\mathrm e}^{i \left (d x +c \right )}+368\right )}{120 d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 a d}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 a d}\) \(194\)
derivativedivides \(\frac {\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{6}}+\frac {7}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}+\frac {3}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {5}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {9}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {21}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{16}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {7}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {3}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {5}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {9}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {21}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{16}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(230\)
default \(\frac {\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{6}}+\frac {7}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}+\frac {3}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {5}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {9}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {21}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{16}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {7}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {3}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {5}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {9}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {21}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{16}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(230\)

input
int(tan(d*x+c)^8/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)
 
output
x/a-1/120*I*(165*exp(11*I*(d*x+c))+720*exp(10*I*(d*x+c))-25*exp(9*I*(d*x+c 
))+2160*exp(8*I*(d*x+c))+450*exp(7*I*(d*x+c))+3680*exp(6*I*(d*x+c))-450*ex 
p(5*I*(d*x+c))+3360*exp(4*I*(d*x+c))+25*exp(3*I*(d*x+c))+1488*exp(2*I*(d*x 
+c))-165*exp(I*(d*x+c))+368)/d/a/(exp(2*I*(d*x+c))+1)^6+5/16/a/d*ln(exp(I* 
(d*x+c))-I)-5/16/a/d*ln(exp(I*(d*x+c))+I)
 
3.1.64.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.21 \[ \int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {480 \, d x \cos \left (d x + c\right )^{6} - 75 \, \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) + 75 \, \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (368 \, \cos \left (d x + c\right )^{5} - 165 \, \cos \left (d x + c\right )^{4} - 176 \, \cos \left (d x + c\right )^{3} + 130 \, \cos \left (d x + c\right )^{2} + 48 \, \cos \left (d x + c\right ) - 40\right )} \sin \left (d x + c\right )}{480 \, a d \cos \left (d x + c\right )^{6}} \]

input
integrate(tan(d*x+c)^8/(a+a*sec(d*x+c)),x, algorithm="fricas")
 
output
1/480*(480*d*x*cos(d*x + c)^6 - 75*cos(d*x + c)^6*log(sin(d*x + c) + 1) + 
75*cos(d*x + c)^6*log(-sin(d*x + c) + 1) - 2*(368*cos(d*x + c)^5 - 165*cos 
(d*x + c)^4 - 176*cos(d*x + c)^3 + 130*cos(d*x + c)^2 + 48*cos(d*x + c) - 
40)*sin(d*x + c))/(a*d*cos(d*x + c)^6)
 
3.1.64.6 Sympy [F]

\[ \int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {\tan ^{8}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]

input
integrate(tan(d*x+c)**8/(a+a*sec(d*x+c)),x)
 
output
Integral(tan(c + d*x)**8/(sec(c + d*x) + 1), x)/a
 
3.1.64.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 329 vs. \(2 (97) = 194\).

Time = 0.31 (sec) , antiderivative size = 329, normalized size of antiderivative = 3.13 \[ \int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\frac {2 \, {\left (\frac {165 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {1095 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3138 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {5118 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {1945 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {315 \, \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}}\right )}}{a - \frac {6 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {15 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {20 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {15 \, a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {6 \, a \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} + \frac {a \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}}} - \frac {480 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {75 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {75 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a}}{240 \, d} \]

input
integrate(tan(d*x+c)^8/(a+a*sec(d*x+c)),x, algorithm="maxima")
 
output
-1/240*(2*(165*sin(d*x + c)/(cos(d*x + c) + 1) - 1095*sin(d*x + c)^3/(cos( 
d*x + c) + 1)^3 + 3138*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 5118*sin(d*x 
+ c)^7/(cos(d*x + c) + 1)^7 + 1945*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - 3 
15*sin(d*x + c)^11/(cos(d*x + c) + 1)^11)/(a - 6*a*sin(d*x + c)^2/(cos(d*x 
 + c) + 1)^2 + 15*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 20*a*sin(d*x + c 
)^6/(cos(d*x + c) + 1)^6 + 15*a*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 - 6*a* 
sin(d*x + c)^10/(cos(d*x + c) + 1)^10 + a*sin(d*x + c)^12/(cos(d*x + c) + 
1)^12) - 480*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a + 75*log(sin(d*x + 
c)/(cos(d*x + c) + 1) + 1)/a - 75*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1) 
/a)/d
 
3.1.64.8 Giac [A] (verification not implemented)

Time = 4.80 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.42 \[ \int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\frac {240 \, {\left (d x + c\right )}}{a} - \frac {75 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} + \frac {75 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} + \frac {2 \, {\left (315 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 1945 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 5118 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 3138 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1095 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 165 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6} a}}{240 \, d} \]

input
integrate(tan(d*x+c)^8/(a+a*sec(d*x+c)),x, algorithm="giac")
 
output
1/240*(240*(d*x + c)/a - 75*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a + 75*log( 
abs(tan(1/2*d*x + 1/2*c) - 1))/a + 2*(315*tan(1/2*d*x + 1/2*c)^11 - 1945*t 
an(1/2*d*x + 1/2*c)^9 + 5118*tan(1/2*d*x + 1/2*c)^7 - 3138*tan(1/2*d*x + 1 
/2*c)^5 + 1095*tan(1/2*d*x + 1/2*c)^3 - 165*tan(1/2*d*x + 1/2*c))/((tan(1/ 
2*d*x + 1/2*c)^2 - 1)^6*a))/d
 
3.1.64.9 Mupad [B] (verification not implemented)

Time = 15.58 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.84 \[ \int \frac {\tan ^8(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {x}{a}-\frac {5\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,a\,d}-\frac {-\frac {21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}+\frac {389\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}-\frac {853\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{20}+\frac {523\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}-\frac {73\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{8}+\frac {11\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )} \]

input
int(tan(c + d*x)^8/(a + a/cos(c + d*x)),x)
 
output
x/a - (5*atanh(tan(c/2 + (d*x)/2)))/(8*a*d) - ((11*tan(c/2 + (d*x)/2))/8 - 
 (73*tan(c/2 + (d*x)/2)^3)/8 + (523*tan(c/2 + (d*x)/2)^5)/20 - (853*tan(c/ 
2 + (d*x)/2)^7)/20 + (389*tan(c/2 + (d*x)/2)^9)/24 - (21*tan(c/2 + (d*x)/2 
)^11)/8)/(d*(a - 6*a*tan(c/2 + (d*x)/2)^2 + 15*a*tan(c/2 + (d*x)/2)^4 - 20 
*a*tan(c/2 + (d*x)/2)^6 + 15*a*tan(c/2 + (d*x)/2)^8 - 6*a*tan(c/2 + (d*x)/ 
2)^10 + a*tan(c/2 + (d*x)/2)^12))